{extend name="user/header" /}
{block name="main"}
<!--作者: 深秋-->
<!--QQ : 1361582519-->
<!--官方QQ群: 758107405-->
<!--GitHub: https://github.com/kaindev8/starMQ-->
<!--保留版权信息，尊重开源精神!-->
<!--禁止修改此文件!-->
<div class="content">

    <div class="col-12 animated fadeIn">
        <div class="block block-rounded">
            <div class="block-header block-header-default">
                <h3 class="block-title text-earth-light">
                    <i class="fa fa-list me-1"></i>订单列表
                </h3>
            </div>
        </div>

        <div class="col-xl-12">
            <div class="block block-rounded">
                <div class="block-content block-content-full">
                    <div class="dataTables_wrapper dt-bootstrap5 no-footer">
                        {if count($l) == 0}
                        <h5 class="text-center">暂无数据</h5>
                        {else}
                        <div class="row mb-4">
                            <div class="col-12">
                                <button type="button" class="btn btn-sm btn-alt-primary me-1" onclick="deorder()">清除未支付
                                </button>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 table-responsive">
                                <table class="table table-bordered table-striped table-vcenter js-dataTable-responsive  no-footer dtr-inline"
                                       id="task-logs-list" data-type="sport" aria-describedby="task-logs-list_info">
                                    <thead>
                                    <tr>
                                        <th style="width: 10px;text-align: center;">
                                            ID
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            创建时间
                                        </th>
                                        <th style="text-align: center" rowspan="1" colspan="1">商户订单号</th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            系统订单号
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            商品名称
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            支付方式
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            订单金额
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            状态
                                        </th>
                                        <th style="text-align: center;" rowspan="1" colspan="1">
                                            操作
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="l" id="v"}
                                    <tr class="odd">
                                        <td style="text-align: center;" class="fs-sm">
                                            {$v.id}
                                        </td>
                                        <td style="text-align: center;">{$v.create_time|date='Y-m-d H:i:s'}</td>
                                        <td style="text-align: center">{$v.out_trade_no}</td>
                                        <td style="text-align: center">{$v.trade_no}</td>

                                        <td style="text-align: center;">{$v.name}</td>

                                        {if $v.type == "wxpay"}
                                        <td style="text-align: center;">
                                            <span class="badge bg-success-light text-success">微信支付</span>
                                        </td>
                                        {else if $v.type == "alipay"}
                                        <td style="text-align: center;">
                                            <span class="badge bg-info-light text-info">支付宝</span>
                                        </td>
                                        {/if}

                                        <td style="text-align: center;">￥{$v.money}</td>

                                        {if $v.status != 1}
                                        <td style="text-align: center;">
                                            <span class="badge bg-danger">未支付</span>
                                        </td>
                                        {else if $v.status == 1}
                                        <td style="text-align: center;">
                                            <span class="badge bg-success">已支付</span>
                                        </td>
                                        {/if}
                                        <td style="text-align: center;">
                                            <button type="button" onclick="operation('{$v.id}','budan')"
                                                    class="btn btn-sm btn-info js-bs-tooltip-enabled" title="补单">
                                                <i class="far fa-paper-plane"></i>
                                            </button>
                                            <button type="button" onclick="operation('{$v.id}','delete')"
                                                    class="btn btn-sm btn-danger js-bs-tooltip-enabled" title="删除">
                                                <i class="fa fa-trash-can"></i>
                                            </button>
                                        </td>
                                    </tr>
                                    {/volist}
                                    {/if}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!--分页-->
                    <div class="row">
                        <div class="col-sm-12 col-md-5">
                        </div>
                        <div class="col-sm-12 col-md-7">
                            <div class="dataTables_paginate paging_full_numbers" id="task-logs-list_paginate">
                                {$p|raw}
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}